Skip to content

feat!: Update to Bevy 0.16 #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

alexparlett
Copy link

@alexparlett alexparlett commented May 22, 2025

Summary

This introduces Bevy 0.16 compatibility.

We should probably in a follow up move to the bevy::platform::collections instead of using std to try and align as closely as possible with the no std approach bevy is taking but i didn't want to do it in this one.

Need to quickly restore the ordering where my ide aligned them with the interface order, but thought it would be good to get visibility on the changes.

Notes

bevy_console is pointing at a branch - there is https://github.com/RichoDemus/bevy-console/pull/88/files awaiting review which would allow us to change this.

@alexparlett alexparlett changed the title chore!:Bevy 0.16 chore!: Update to Bevy 0.16 May 22, 2025
@alexparlett alexparlett changed the title chore!: Update to Bevy 0.16 feat!: Update to Bevy 0.16 May 22, 2025
@alexparlett alexparlett force-pushed the bevy_0.16 branch 2 times, most recently from 81d34b7 to 1e87793 Compare May 22, 2025 18:21
* Move from utils::HashMap to platform::collections::HashMap
* Change to IntoSchedules vs IntoSystems
* Change in namespaces
@makspll
Copy link
Owner

makspll commented May 28, 2025

  • bevy console 0.14.0 released

@CrushedPixel
Copy link
Contributor

Is there anything holding this up? Formatting needs to be fixed up, anything else to do?

@shanecelis
Copy link
Contributor

I'm curious too about the fate of this PR.

@Nub
Copy link

Nub commented Jul 2, 2025

Bump on getting this landed?

@shanecelis
Copy link
Contributor

I'm anxious for this PR to land, and I inadvertently did a big overhaul with PR #427 to use handles rather than script IDs, so to make amends I handled the merge conflicts to create #431 which contains both handles and 0.16 support.

@makspll
Copy link
Owner

makspll commented Jul 3, 2025

Looking at this now, it looks like there is still some work left on the codegen side which is currently failing. Did you update the generated bindings manually 👀

Copy link
Contributor

github-actions bot commented Jul 3, 2025

🐰 Bencher Report

Branchbevy_0.16
Testbedlinux-gha

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
component/access Lua📈 view plot
⚠️ NO THRESHOLD
3,542.80 ns
component/access Rhai📈 view plot
⚠️ NO THRESHOLD
5,236.30 ns
component/get Lua📈 view plot
⚠️ NO THRESHOLD
2,182.50 ns
component/get Rhai📈 view plot
⚠️ NO THRESHOLD
3,970.00 ns
conversions/Mut::from📈 view plot
⚠️ NO THRESHOLD
83.30 ns
conversions/Ref::from📈 view plot
⚠️ NO THRESHOLD
83.31 ns
conversions/ScriptValue::List📈 view plot
⚠️ NO THRESHOLD
281.54 ns
conversions/ScriptValue::Map📈 view plot
⚠️ NO THRESHOLD
1,417.80 ns
conversions/ScriptValue::Reference::from_into📈 view plot
⚠️ NO THRESHOLD
26.26 ns
conversions/Val::from_into📈 view plot
⚠️ NO THRESHOLD
279.74 ns
function/call 4 args Lua📈 view plot
⚠️ NO THRESHOLD
1,643.50 ns
function/call 4 args Rhai📈 view plot
⚠️ NO THRESHOLD
1,319.30 ns
function/call Lua📈 view plot
⚠️ NO THRESHOLD
235.06 ns
function/call Rhai📈 view plot
⚠️ NO THRESHOLD
390.37 ns
loading/empty Lua📈 view plot
⚠️ NO THRESHOLD
48,153.00 ns
loading/empty Rhai📈 view plot
⚠️ NO THRESHOLD
684,620.00 ns
math/vec mat ops Lua📈 view plot
⚠️ NO THRESHOLD
6,807.20 ns
math/vec mat ops Rhai📈 view plot
⚠️ NO THRESHOLD
6,234.10 ns
query/10 entities Lua📈 view plot
⚠️ NO THRESHOLD
18,918.00 ns
query/10 entities Rhai📈 view plot
⚠️ NO THRESHOLD
17,871.00 ns
query/100 entities Lua📈 view plot
⚠️ NO THRESHOLD
37,402.00 ns
query/100 entities Rhai📈 view plot
⚠️ NO THRESHOLD
31,556.00 ns
query/1000 entities Lua📈 view plot
⚠️ NO THRESHOLD
233,200.00 ns
query/1000 entities Rhai📈 view plot
⚠️ NO THRESHOLD
177,570.00 ns
reflection/10 Lua📈 view plot
⚠️ NO THRESHOLD
5,502.90 ns
reflection/10 Rhai📈 view plot
⚠️ NO THRESHOLD
14,997.00 ns
reflection/100 Lua📈 view plot
⚠️ NO THRESHOLD
46,307.00 ns
reflection/100 Rhai📈 view plot
⚠️ NO THRESHOLD
725,030.00 ns
resource/access Lua📈 view plot
⚠️ NO THRESHOLD
3,159.60 ns
resource/access Rhai📈 view plot
⚠️ NO THRESHOLD
4,678.50 ns
resource/get Lua📈 view plot
⚠️ NO THRESHOLD
1,809.50 ns
resource/get Rhai📈 view plot
⚠️ NO THRESHOLD
3,329.40 ns
🐰 View full continuous benchmarking report in Bencher

@makspll
Copy link
Owner

makspll commented Jul 5, 2025

The good news is it seems the new rustup version didn't break the codegen crate (i.e. it does not require a rustc_plugin version bump, which is always the most painful bit)

Codegen seems to need a few small adjustments and we should be good to go

@@ -96,6 +95,8 @@ impl WorldAccessGuard<'_> {
DynamicComponent::STORAGE_TYPE,
Layout::new::<DynamicComponent>(),
needs_drop::<DynamicComponent>().then_some(|x| x.drop_as::<DynamicComponent>()),
true,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we need to consider specializing clone here, but I don't think so, the vanilla derive(Component) seems to do the same thing for all components I looked at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants